<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "tb_courseschedule".
 *
 * @property integer $schedule_id
 * @property integer $issue_id
 * @property string $teacher_names
 * @property string $title
 * @property integer $startTime
 * @property integer $endTime
 * @property string $img
 * @property string $courseTime
 * @property integer $coursePayment
 * @property string $ppt
 * @property integer $state
 * @property string $info
 * @property string $summary
 * @property integer $type
 * @property integer $sort
 * @property string $luping_vid
 * @property string $info_m
 */
class TbCourseschedule extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tb_courseschedule';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('passportdb');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['issue_id', 'teacher_names', 'title', 'startTime', 'endTime', 'img', 'courseTime', 'coursePayment', 'ppt', 'summary', 'sort', 'luping_vid', 'info_m'], 'required'],
            [['issue_id', 'startTime', 'endTime', 'coursePayment', 'state', 'type', 'sort'], 'integer'],
            [['teacher_names', 'ppt', 'info', 'summary', 'info_m'], 'string'],
            [['courseTime'], 'number'],
            [['title', 'luping_vid'], 'string', 'max' => 100],
            [['img'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'schedule_id' => 'Schedule ID',
            'issue_id' => 'Issue ID',
            'teacher_names' => 'Teacher Names',
            'title' => 'Title',
            'startTime' => 'Start Time',
            'endTime' => 'End Time',
            'img' => 'Img',
            'courseTime' => 'Course Time',
            'coursePayment' => 'Course Payment',
            'ppt' => 'Ppt',
            'state' => 'State',
            'info' => 'Info',
            'summary' => 'Summary',
            'type' => 'Type',
            'sort' => 'Sort',
            'luping_vid' => 'Luping Vid',
            'info_m' => 'Info M',
        ];
    }
}
